/**
 * 
 */
package com.nervytech.tutorcruise.db.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nervytech.tutorcruise.db.dao.interfaces.ICurrencyDAO;
import com.nervytech.tutorcruise.db.service.interfaces.ICurrencyService;
import com.nervytech.tutorcruise.service.exception.TrainerCruiseServiceException;

/**
 * @author ADMIN
 * 
 */
@Service("currencyService")
public class CurrencyService implements ICurrencyService {

	@Autowired
	private ICurrencyDAO currencyDAO;

	@Override
	public Map<Integer, String> getCurrenciesMap()
			throws TrainerCruiseServiceException {
		Map<Integer, String> currencyMap = new HashMap<Integer, String>();

		try {
			currencyMap = currencyDAO.getCurrencyMap();
		} catch (Exception e) {
			e.printStackTrace();
			throw new TrainerCruiseServiceException(e.getMessage());
		}
		return currencyMap;
	}

}
